/**
 * @author machao
 */
(function($){
    $.fn.shadow = function(){
        var targetCpt = $(this);
        var targetId = targetCpt.attr("id");
        var targetWidth = targetCpt.width();
        var targetHeight = targetCpt.height();
        var targetTop = targetCpt.offset().top;
        var targetLeft = targetCpt.offset().left;
        var shadowId = targetId+"_shadow";
        targetCpt.before("<div id="+shadowId+"></div>");
        var temp = "#"+shadowId;
        var shadowDiv = $(temp);
        shadowDiv.addClass("ui-widget-shadow ui-corner-all");
        var shadowWidth = targetWidth;
        var shadowHeight = targetHeight;
        var shadowTop = targetTop + 1;
        var shadowLeft = targetLeft + 1;
        shadowDiv.css("width",shadowWidth);
        shadowDiv.css("height",shadowHeight);
        shadowDiv.css("top",shadowTop);
        shadowDiv.css("left",shadowLeft);
        shadowDiv.css("position","absolute");
    };
}
)(jQuery);